<?
session_name("MeuLogin");
session_start();

require("loga.php");

?>

<head>
<title>ECOMP - Colegiado de Engenharia de Computa&ccedil;&atilde;o UEFS.</title>
<meta http-equiv="content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
td img {display: block;}
</style>

<style type="text/css">
<!--
body,td,th {
	font-family: Century Gothic, Trebuchet MS, Verdana;
	font-size: 14px;
	color: #333333;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
a:link {
	color: #333333;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #333333;
}
a:hover {
	text-decoration: none;
	color: #666666;
}
a:active {
	text-decoration: none;
	color: #333333;
}
.style4 {font-size: 16px}
.style5 {
	font-size: 12px;
	font-family: Verdana;
	font-weight: bold;
}
-->
</style></head>


<!--Fireworks CS3 Dreamweaver CS3 target.  Created Sat Feb 07 20:56:19 GMT-0300 (Hora oficial do Brasil) 2009-->
</head>
<body bgcolor="#c8c8c8">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- fwtable fwsrc="lay_out pag UEFS.png" fwpage="Page 1" fwbase="col_ecomp.jpg" fwstyle="Dreamweaver" fwdocid = "1222939957" fwnested="0" -->
  <tr>
   <td><img src="spacer.gif" width="33" height="1" border="0" alt="" /></td>
   <td><img src="spacer.gif" width="732" height="1" border="0" alt="" /></td>
   <td><img src="spacer.gif" width="35" height="1" border="0" alt="" /></td>
   <td><img src="spacer.gif" width="1" height="1" border="0" alt="" /></td>
  </tr>

  <tr>
   <td colspan="3"><img name="col_ecomp_r1_c1" src="col_ecomp_r1_c1.jpg" width="800" height="236" border="0" id="col_ecomp_r1_c1" alt="" /></td>
   <td><img src="spacer.gif" width="1" height="236" border="0" alt="" /></td>
  </tr>
  <tr>
   <td rowspan="2"><img name="col_ecomp_r2_c1" src="col_ecomp_r2_c1.jpg" width="33" height="964" border="0" id="col_ecomp_r2_c1" alt="" /></td>
   <td valign="top" bgcolor="#FFFFFF">

<!-- Aqui a tabela -->
<!-- Aqui os metodos POST -->




<?
// nivel 2 - Administrador
if ($_SESSION["nivel"] == 2){



		if($_GET[ 'act' ]=="cadastrar") {

			   // Grava na Tabela Departamento

			  $conn = mysql_connect("localhost","tocolado_gt02","ecompgt02");
			  $banco = mysql_select_db("tocolado_ecomp");

			  mysql_query("INSERT INTO TipoDisciplina (ID,descricao) VALUES (
			  NULL,
			  '{$_POST[ 'descricao' ]}'
			  )");

			  print "<center>Tipo de Disciplina criado com sucesso!</center>";
        }

        else  {
				?>
         			<form name="cad_tipodisciplina" method="post" action="?act=cadastrar">
                    <table width="383" border="0" align="center" cellpadding="3">
                      <tr>
                        <td colspan="2" align="center" valign="top"><span class="style4">Cadastrar Tipo de Disciplina</span></td>
                      </tr>
                      <tr>
                        <td width="152" align="left">Descrição:</td>
                        <td width="207" align="left"><input name="descricao" type="text" id="descricao" size="32" maxlength="80" /></td>
                      </tr>
                      
                      <tr>
                        <td colspan="2" align="center"><input type="submit" value="Cadastrar Tipo Disciplina"></td></tr>
                    </table>
				</form>
				<?
				}
} else {
		echo '<br><br>Voce nao tem privilegios de Administrador do Sistema - Nivel 2
			<br><p><a href="page.php" class="style1">Voltar</a></p>';
}
?>

<a href="page.php"><img src="imgs/kack.gif" width="90" height="40" border="0" /></a>

<!-- Aqui a tabela -->
<!-- Aqui os metodos POST -->  </td>
   <td rowspan="2"><img name="col_ecomp_r2_c3" src="col_ecomp_r2_c3.jpg" width="35" height="964" border="0" id="col_ecomp_r2_c3" alt="" /></td>
   <td><img src="spacer.gif" width="1" height="876" border="0" alt="" /></td>
  </tr>
  <tr>
   <td><img name="col_ecomp_r3_c2" src="col_ecomp_r3_c2.jpg" width="732" height="88" border="0" id="col_ecomp_r3_c2" alt="" /></td>
   <td><img src="spacer.gif" width="1" height="88" border="0" alt="" /></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><div align="center"><span class="style5">Universidade Estadual De Feira de Santana - Colegiado de Engenharia de Computa&ccedil;&atilde;o &copy; 2009.</span></div></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>

